"""meiduo_mall URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  url(r'^$', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  url(r'^$', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url
from . import views


urlpatterns = [
    url(r'^register/$', views.RegisterView.as_view(), name="register"),
    url(r'^usernames/(?P<username>\w{5,20})/count/$', views.CheckUserName.as_view(), name="checkuser"),
    url(r'^mobiles/(?P<mobile>1[345789]\d{9})/count/$', views.Checkphone.as_view(), name="checkmoile"),
    url(r'^login/$', views.LoginView.as_view(), name="login"),
    url(r'^logout/$', views.LogoutUserView.as_view()),
    url(r'^info/$', views.UserCenterView.as_view()),
    url(r'^emails/$', views.EmailSendView.as_view()),
    url(r'^emails/verification/$', views.EmailActiveView.as_view()),
    url(r'^addresses/$', views.AddressView.as_view()),
    url(r'^addresses/create/$', views.AddressCreateView.as_view()),
    url(r'^addresses/(?P<address_id>\d+)/$', views.AddressUpdataView.as_view()),
    url(r'^addresses/(?P<address_id>\d+)/default/$', views.AddressDefaultView.as_view()),
    url(r'^addresses/(?P<address_id>\d+)/title/$', views.AddressTitleView.as_view()),
    url(r'^password/$',views.PasswordChangeView.as_view()),
    url(r'^browse_histories/$', views.UserBrowserHistoryView.as_view()),
    url(r'^findpassword/$', views.UserFindPasswordView.as_view()),
    url(r'^accounts/(?P<username>\w{5,20})/sms/token/$', views.UserFindPasswordFirstStepView.as_view()),
    url(r'^accounts/(?P<username>\w{5,20})/password/token/$', views.UserFindPasswordSecondStepView.as_view()),
    url(r'^sms_codes01/$', views.UserFindPasswordSMSView.as_view()),
    url(r'^users/(?P<user_id>\d+)/password/$', views.UserFindPassword3thView.as_view()),






    # url(r'^accounts/(?P<username>\w{5,20})/sms/token/?text=(?P<image_code>w{4})&image_code_id=(?P<image_code_id>.+)/$', views.UserFindPasswordCheckView.as_view()),
]
